<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <style>
    body {
      background-color: white;
      color: black;
      animation: change-background-color 3s infinite alternate;
    }

    @keyframes change-background-color {
      to {
        background-color: black;
        color: white;
      }
    }
  </style>
</head>
<body>
  <h1>Animated body element</h1>
</body>
</html>
